const express = require("express");
const router = express.Router();
const {
  list,
  details,
  add,
  del,
  update,
  getChapterById,
} = require("../../controllers/learn/commentsController");
/**
 * 查询所有评论信息
 * GTE  /comments/list
 */
router.get("/list", list);

/**
 * 查询评论列表
 * GET /comments/getChapterById
 */
router.get("/getChapterById", getChapterById);

/**
 * 查询评论详情
 * GET /comments/details
 */
router.get("details", details);

/**
 * 新增评论
 * POST /comments/add
 */
router.post("/add", add);

/**
 * 删除评论
 * DELETE /comments/delete
 */
router.delete("/delete", del);

/**
 * 更新评论
 * PUT /comments/update
 */
router.put("/update", update);

module.exports = router;
